﻿<?xml version="1.0" encoding="utf-8"?>
<xsd:schema id="NavigationLanguageSchema" targetNamespace="http://schemas.microsoft.com/dsltools/NavigationLanguage" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/dsltools/NavigationLanguage" xmlns:core="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:import id="CoreSchema" namespace="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" />
  <!-- NavigationDiagram -->
  <xsd:element name="navigationDiagram" type="NavigationDiagram" substitutionGroup="core:modelElement" />
  <xsd:complexType name="NavigationDiagram">
    <xsd:annotation>
      <xsd:documentation>The root in which all other elements are embedded. Appears as a diagram.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: NavigationDiagramHasStates -->
          <xsd:element name="states" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of NavigationDiagramHasStates</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="navigationDiagramHasStates">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from NavigationDiagramHasStates needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="state" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- dslVersion -->
        <xsd:attribute name="dslVersion" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Version of the model serialized in this file.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- NavigationDiagram Moniker -->
  <xsd:element name="navigationDiagramMoniker" type="NavigationDiagramMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="NavigationDiagramMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for NavigationDiagram instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- State -->
  <xsd:element name="state" type="State" substitutionGroup="core:modelElement" />
  <xsd:complexType name="State">
    <xsd:annotation>
      <xsd:documentation>States embedded in the Diagram. Appear as boxes on the diagram.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: Transition -->
          <xsd:element name="successors" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of Transition</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element ref="transition" minOccurs="0" maxOccurs="unbounded">
                  <xsd:annotation>
                    <xsd:documentation>[Instance of Transition needs to be serialized in full-form]</xsd:documentation>
                  </xsd:annotation>
                </xsd:element>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Key -->
        <xsd:attribute name="key" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Unique within a Dialog, used by Dialog and Transition elements to specify configuration.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Page -->
        <xsd:attribute name="page" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The aspx Page to display when navigating to this State.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Title -->
        <xsd:attribute name="title" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The textual description of the State. ResourceType and ResourceKey can be used for localization.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Route -->
        <xsd:attribute name="route" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The route Url pattern.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: TrackCrumbTrail -->
        <xsd:attribute name="trackCrumbTrail" type="xsd:boolean" >
          <xsd:annotation>
            <xsd:documentation>Indicates whether to maintain crumb trail information.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: CheckPhysicalUrlAccess -->
        <xsd:attribute name="checkPhysicalUrlAccess" type="xsd:boolean" >
          <xsd:annotation>
            <xsd:documentation>Indicates whether ASP.NET should validate that the user has authority to access the physical Page.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Masters -->
        <xsd:attribute name="masters" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The master pages to assign to the Page when displayed.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Theme -->
        <xsd:attribute name="theme" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The theme to assign to the Page when displayed.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: ResourceType -->
        <xsd:attribute name="resourceType" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Used with ResourceKey, specifies the resource file type for State Title localization.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: ResourceKey -->
        <xsd:attribute name="resourceKey" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Used with ResourceType, specifies the resource name for State Title localization.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Order -->
        <xsd:attribute name="order" type="xsd:integer" >
          <xsd:annotation>
            <xsd:documentation>The order of the State in the configuration.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Initial -->
        <xsd:attribute name="initial" type="xsd:boolean" >
          <xsd:annotation>
            <xsd:documentation>Set to true to indicate the start of a Dialog.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Path -->
        <xsd:attribute name="path" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The Url that will cause a navigation to this Initial State. It should not contain a query string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: DialogKey -->
        <xsd:attribute name="dialogKey" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Unique across Dialogs and passed as the action parameter to the StateController when navigating.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: DialogTitle -->
        <xsd:attribute name="dialogTitle" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The textual description of the Dialog. ResourceType and ResourceKey can be used for localization.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: DialogResourceType -->
        <xsd:attribute name="dialogResourceType" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Used with ResourceType, specifies the resource name for Dialog Title localization.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: DialogResourceKey -->
        <xsd:attribute name="dialogResourceKey" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Used with ResourceKey, specifies the resource file type for Dialog Title localization.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: DialogOrder -->
        <xsd:attribute name="dialogOrder" type="xsd:integer" >
          <xsd:annotation>
            <xsd:documentation>The order of the Dialog in the configuration.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: MobilePage -->
        <xsd:attribute name="mobilePage" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The aspx page to display for a mobile device navigating to this State.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: MobileRoute -->
        <xsd:attribute name="mobileRoute" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The mobile device route Url pattern.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: MobileTheme -->
        <xsd:attribute name="mobileTheme" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The theme to assign to the Page when displayed for a mobile device.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: MobileMasters -->
        <xsd:attribute name="mobileMasters" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The master pages to assign to the Page when displayed for a mobile device.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Defaults -->
        <xsd:attribute name="defaults" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The default NavigationData for this State.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- State Moniker -->
  <xsd:element name="stateMoniker" type="StateMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="StateMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for State instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- NavigationDiagramHasStates -->
  <xsd:element name="navigationDiagramHasStates" abstract="true" type="NavigationDiagramHasStates" substitutionGroup="core:modelElement" />
  <xsd:complexType name="NavigationDiagramHasStates" abstract="true" >
    <xsd:annotation>
      <xsd:documentation>Embedding relationship between the Diagram and States</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end State -->
          <xsd:element ref="state" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- NavigationDiagramHasStates Moniker -->
  <xsd:element name="navigationDiagramHasStatesMoniker" type="NavigationDiagramHasStatesMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="NavigationDiagramHasStatesMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for NavigationDiagramHasStates instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Transition -->
  <xsd:element name="transition" type="Transition" substitutionGroup="core:modelElement" />
  <xsd:complexType name="Transition">
    <xsd:annotation>
      <xsd:documentation>Navigation between States.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end State -->
          <xsd:element ref="stateMoniker" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Key -->
        <xsd:attribute name="key" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Unique within a State and passed as the action parameter to the StateController when navigating.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: CanNavigateBack -->
        <xsd:attribute name="canNavigateBack" type="xsd:boolean" >
          <xsd:annotation>
            <xsd:documentation>Set to true to ensure the linked States always have the same parent Dialog.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Order -->
        <xsd:attribute name="order" type="xsd:integer" >
          <xsd:annotation>
            <xsd:documentation>The order of the Transition in the configuration.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Transition Moniker -->
  <xsd:element name="transitionMoniker" type="TransitionMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="TransitionMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Transition instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
</xsd:schema>

